@@ -443,7 +443,7 @@ module Agents |
||
443 | 443 |
end |
444 | 444 |
|
445 | 445 |
def use_namespaces? |
446 |
- if value = interpolated.key?('use_namespaces') |
|
446 |
+ if interpolated.key?('use_namespaces') |
|
447 | 447 |
boolify(interpolated['use_namespaces']) |
448 | 448 |
else |
449 | 449 |
interpolated['extract'].none? { |name, extraction_details| |
@@ -16,12 +16,10 @@ class Delayed::Job |
||
16 | 16 |
scope :failed, -> { where("failed_at IS NOT NULL") } |
17 | 17 |
end |
18 | 18 |
|
19 |
-def database_deadlocks_when_using_optimized_strategy? |
|
19 |
+database_deadlocks_when_using_optimized_strategy = lambda do |
|
20 | 20 |
ENV["DATABASE_ADAPTER"] == "mysql2" |
21 | 21 |
end |
22 | 22 |
|
23 |
-if database_deadlocks_when_using_optimized_strategy? |
|
24 |
- Delayed::Backend::ActiveRecord.configure do |config| |
|
25 |
- config.reserve_sql_strategy = :default_sql |
|
26 |
- end |
|
27 |
-end |
|
23 |
+Delayed::Backend::ActiveRecord.configure do |config| |
|
24 |
+ config.reserve_sql_strategy = :default_sql |
|
25 |
+end if database_deadlocks_when_using_optimized_strategy.call |
@@ -34,7 +34,7 @@ namespace :production do |
||
34 | 34 |
end |
35 | 35 |
|
36 | 36 |
task :start => :check do |
37 |
- puts "Startig huginn ..." |
|
37 |
+ puts "Starting huginn ..." |
|
38 | 38 |
run_sv('start') |
39 | 39 |
end |
40 | 40 |
|